################################################################################
# Title   : Master file
# Project : The Impact of Unions on Non-union Wage Setting: Threats and Bargaining
# Authors : David A. Green, Ben M. Sand, Iain G. Snoddy, Jeanne Tschopp
# Date    : August 2025
# Output  : Paper - Figures 2-6
#         : Appendix Figures      
################################################################################

# Load required libraries
library(DescTools)
library(tidyverse)
library(haven)
library(latex2exp)
library(ggrepel)
library(zoo)
library(stringr)
library(AER)
library(patchwork)

# ---- 1. Set Global Paths ----

root  <- "/Users/bensand/Library/CloudStorage/Dropbox/Projects/Union_Rep_Package"
figs  <- file.path(root, "Results", "Figures")
wd    <- file.path(root, "Working_data")
code  <- file.path(root, "Programs", "03_analysis","Rscripts")

# ---- 2. Source Scripts ----

# Paper - Tables 2 - 6
source(file.path(code, "Figure_2.R"))
source(file.path(code, "Figure_3.R"))
source(file.path(code, "Figure_4.R"))
source(file.path(code, "Figure_5.R"))
source(file.path(code, "Figure_6.R"))

# Appendix - Figures 3
source(file.path(code, "Append_figure_3.R"))
source(file.path(code, "Append_figure_4.R"))

sessioninfo::session_info() %>% 
  capture.output(file = file.path(root,"R_session_info.txt"))